<note>
Ce tutoriel est un exemple de serveur domotique. Il utilise un matériel compatible X10 : CM11A.
</note>

{{tag>heyu Gutsy tutoriel BROUILLON}}
------

====== Installer un serveur domotique ======



===== Installation de Heyu =====

<note>
Heyu permet de piloter le module CM11A.
</note>



==== Pré-requis ====

  sudo apt-get install -y linux-headers-`uname -r` build-essential


==== Installation ====

Heyu n'est pas livré avec Ubuntu, il faut l'installer manuellement :
  wget http://heyu.tanj.com/download/heyu-2.1.3.tgz
  tar zxvf heyu-2.1.3.tgz
  cd heyu-2.1.3
  ./Configure
  make
  sudo make install

Répondre au questions posées pendant l'installation :

  Where would you like the sample Heyu configuration file installed?
    1. In directory /home/manu/.heyu/
    2. In subdirectory .heyu/ under a different user home directory
    3. In directory /etc/heyu  (for system-wide access)
    4. No thanks, I'll take care of it myself
  Choice [1, 2, 3, or 4] ? 3
  
  Specify /dev/ttyS0, /dev/ttyS1, etc.\\ 
  To which port is the CM11 attached?\\ 
  /dev/ttyS0 







==== Utilisation ====

On va vérifier que heyu fonctionne correctement.

  heyu info
  
  starting heyu_relay
  2007/12/18 12:20:08  Poll received unknown value (1 bytes), leading byte = a5
  Heyu version 2.1.3
  Configuration at /etc/heyu/x10.conf
  Powerline interface on /dev/ttyS0
  Firmware revision Level = 8
  Interface battery usage = Unknown (0xFFFF)
  Raw interface clock: Tue, 12:20:08, Day 351
  (--> Civil Time: Tue  12:20:08  Dec 18 2007 CET)
  No schedule has been uploaded by Heyu.
  Housecode = A
  0 = off, 1 = on,               unit  16.......8...4..1
  Last addressed device =       0x0000 (0000000000000000)
  Status of monitored devices = 0x0000 (0000000000000000)
  Status of dimmed devices =    0x0000 (0000000000000000)

===== Installation d'un frontal pour Heyu : domus.Link =====
<note>domus.Link n'est fourni par défaut par Ubuntu, il faut le télécharger sur le site : [[http://domus.link.co.pt/|domus.Link]]</note>

==== Pré-requis ====
Il faut arrêter Heyu :
  heyu stop


==== Installation ====
Une fois l'archive récupérée (domuslink-0.1.1.tar.gz), on va l'installer :
  sudo tar zxvf domuslink-0.1.1.tar.gz -C /var/www
  mv /etc/heyu/x10.conf /etc/heyu/x10.conf.save
  cp /var/www/domus.Link/x10.conf /etc/heyu/
  sudo chmod +rw /etc/heyu/x10.conf
  sudo chmod +rw /var/www/domus.Link/config.php


===== Installation de ZoneMinder =====


==== Installation ====
  sudo apt-get install -y zoneminder apache2 php5-mysql libapache2-mod-php5 mysql-server ffmpeg
  sudo ln -s /etc/zm/apache.conf /etc/apache2/conf.d/zoneminder.conf
  sudo /etc/init.d/apache2 force-reload

==== Configuration de l'envoi d'email ====

  sudo apt-get install sendmail
  sudo perl -MCPAN -e shell
  cpan> MIME::Entity
  cpan> MIME::Lite
  cpan> Net::SMTP

----
//Contributeurs : [[utilisateurs:manusvs650|manusvs650]].//